package com.zyh.map;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @Author zyh
 * @Date 2024/8/2 8:57
 * @Description LinkedHashMap   特点：存储有序
 */

public class LinkedHashMapDemo1 {
    public static void main(String[] args) {
        LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
        map.put("1","zyh");
        map.put("3","cxk");
        map.put("5","dz");
        map.put("2","wy");
        System.out.println(map);
        Map<String, String> map1 = new HashMap<>();
        map1.put("1","zyh");
        map1.put("3","cxk");
        map1.put("5","dz");
        map1.put("2","wy");
        System.out.println("map1 = " + map1);
    }
}
